package com.xiyun.vod.service.impl;

import com.xiyun.vod.service.VodService;
import com.xiyun.vod.utils.VodUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

@Service
public class VodServiceImpl implements VodService {

    @Override
    public String uploadVideo(MultipartFile file) {
        return VodUtil.uploadStream(file);
    }

    @Override
    public String delVideo(String videoId) {
        return VodUtil.removeVideo(videoId);
    }

    @Override
    public void delVideosBatch(List<String> videoIdList) {
        VodUtil.batchRemoveVideos(videoIdList);
    }
}
